import os
import re

path = "E:\迅雷下载\新建文件夹"
files = os.listdir(path)

s = []

for file in  files:
    file_name = file
    new_file_name = re.sub(r'rmvb', ".rmvb", file_name)
    os.rename(file_name, new_file_name)
    print(file_name,"————>",new_file_name)